package com.mtung.concurrent.thread.pool;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author zhenguo.yao
 * @date 2020/12/25
 */
public class MyRejectHandler implements RejectedExecutionHandler {
    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        // 自定义拒绝策略,比如记录日志,发送短信,邮件等导致运维人员
    }
}
